<include file='Public:head' />
<body class="J_scroll_fixed">
<style>
.pop_nav{
	padding: 0px;
}


</style>
<div class="wrap J_check_wrap">
  <div class="nav">
    <ul class="cc">
  		<li ><a href="{:U('Category/index')}">栏目列表</a></li>
		<li class="current"><a href="javascrip:;">添加栏目</a></li>
      </ul>
	</div>
  <div class="pop_nav">
    <ul class="J_tabs_nav">
      <li class="current"><a href="javascript:;;">基本属性</a></li>
      <li class=""><a href="javascript:;;">高级属性</a></li>

    </ul>
  </div>
  <form class="J_ajaxForms" name="myform" id="myform" action="{:U('Category/add')}" method="post">
    <div class="J_tabs_contents layui-form">
      <div>
        <div class="h_a">基本属性</div>
        <div class="">
          <table width="100%" class="layui-table ">
            <tr>
              <th  width="200">请选择栏目模型：</th>
              <td>
              	<span class="must_red">*</span>
                <div class="layui-input-inline">
                <select name="model_mid" id="model_mid">
                  <option value='' >请选择栏目模型</option>
                  <volist name='model' id='value'>
                  	<option value="{$value.mid}" <if condition='isset($parent["model_mid"]) && $parent["model_mid"] eq $value["mid"]'> selected='selected' </if> >{$value.remark}</option>  
              	   </volist>             
                 </select></div></td>
            </tr>
             <tr>
              <th  width="200">请选择栏目类型：</th>
              <td>
              <div class="layui-input-inline">
                <select name="type_typeid" id="type_typeid">
                  <option value='0' >请选择栏目类型</option>
                  <volist name='type' id='value'>
                    <option value="{$value.typeid}"  <if condition='isset($parent["type_typeid"]) && $parent["type_typeid"] eq $value["typeid"]'> selected='selected' </if>>{$value.typename}</option>  
                   </volist>             
                 </select></div></td>
            </tr>
            <tr>
              <th >上级栏目：</th>
              <td><div class="layui-input-inline"><select name="pid" id="pid">
                  <option value='0'>≡ 作为一级栏目 ≡</option>
                   <volist name='category' id='value'>
                  	<option value="{$value.cid}" <if condition='isset($parent["cid"]) && $parent["cid"] eq $value["cid"]'> selected='selected' </if>>{$value._name}</option>  
              	   </volist>     
                </select></div></td>
            </tr>
           
            

          
            <tr id="normal_add">
              <th>栏目名称：</th>
              <td><span class="must_red">*</span><input type="text" name="cname" id="cname" class='layui-input' value="" style="width: 80%;"></td>
            </tr>
            <tr id="normal_add">
              <th>(英)栏目名称：</th>
              <td><input type="text" name="cname_en" id="cname_en" class='layui-input' value="" style="width: 80%;"></td>
            </tr>

            




           
            <tr>
              <th>栏目缩略图：</th>
              <td>



<div class="pics_box">
                  <div class="pics">
                    <ul class="feng-form-item-photo">
                      <input type="hidden" name="pic" value="{$data.pic}" class="n" />
                      <li class="upload-btn pic_upload" data-name="pic" />
                      <i class="layui-icon layui-icon-upload"></i>上传图片
                      </li>
                  </ul>
                  </div>      
                </div>





             
              </td>
            </tr>
             <tr>
              <th>(英)栏目缩略图：</th>
              <td>
                <div class="pics_box">
                  <div class="pics">
                    <ul class="feng-form-item-photo">
                      <input type="hidden" name="pic_en" value="{$data.pic_en}" class="n" />
                      <li class="upload-btn pic_upload" data-name="pic_en" />
                      <i class="layui-icon layui-icon-upload"></i>上传图片
                      </li>
                  </ul>
                  </div>      
                </div>


              </td>
            </tr>
           
            <tr>
              <th ><strong>META Keywords(栏目关键词)</strong><br/>
                关键字中间用半角逗号隔开</th>
              <td><textarea name='keywords' id='keywords' style="width:90%;height:80px" class="layui-textarea"></textarea></td>
            </tr>

            <if condition='C("cfg_language_en")'>
            <tr>
              <th ><strong>(英)META Keywords(栏目关键词)</strong><br/>
                关键字中间用半角逗号隔开</th>
              <td><textarea name='keywords_en' id='keywords_en' style="width:90%;height:80px" class="layui-textarea"></textarea></td>
            </tr>
            </if>

            <tr>
              <th ><strong>META Description(栏目描述)</strong><br/>
                针对搜索引擎设置的网页描述</th>
              <td><textarea name='description' id='description' style="width:90%;height:80px" class="layui-textarea"></textarea></td>
            </tr>
            <if condition='C("cfg_language_en")'>
            <tr>
              <th ><strong>(英)META Description(栏目描述)</strong><br/>
                针对搜索引擎设置的网页描述</th>
              <td><textarea name='description_en' id='description_en' style="width:90%;height:80px" class="layui-textarea"></textarea></td>
            </tr>
            </if>
            <tr>
              <th>显示排序：</th>
              <td><input type="text" name="sort" id="sort" class='layui-input' value="100"></td>
            </tr>
            <tr>
              <th >是显示：</th>
              <td>
                  <input type='radio' name='is_show' title='是' value='1' <if condition='!isset($parent["is_show"]) || $parent["is_show"] '> checked='checked'</if>>
                  <input type='radio' name='is_show' value='0' title='不显示'  <if condition='isset($parent["is_show"]) && !$parent["is_show"] '> checked='checked'</if>>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div style="display:none">
        <div class="h_a">高级属性</div>
        <div class="table_full">
          <table width="100%" class="table_form ">
            
            <tr >
              <th width="200">每页记录数：</th>
              <td><input type="text" name="page" id="page" class='layui-input' value="<if condition='isset($parent["page"])' >{$parent.page}<else />20</if>" ></td>
            </tr>
            <tr>
              <th>栏目类型：</th>
              <td>

              		<input type="radio" title='普通' name="cat_type" value="1" <if condition='isset($parent["cat_type"]) && $parent["cat_type"] eq 1 '> checked='checked'<else />checked='checked'</if>> 


              		<input type="radio" name="cat_type" title='封面' value="2" <if condition='isset($parent["cat_type"]) && $parent["cat_type"] eq 2 '> checked='checked'</if>>


              		<input type="radio" name="cat_type" value="3" title='跳转' <if condition='isset($parent["cat_type"]) && $parent["cat_type"] eq 3 '> checked='checked'</if>> 


              		<input type="radio" name="cat_type" value="4" title='单页' <if condition='isset($parent["cat_type"]) && $parent["cat_type"] eq 4 '> checked='checked'</if>>

              </td>
            </tr>
            <tr>
              <th >跳转地址：</th>
              <td><input type="text" name="go_url" id="go_url" class='layui-input' style="width:90%"></td>
            </tr>
            <tr>
              <th>是否跳转到子栏目：</th>
              <td>
              		<input type="radio" title="否" name="go_child" value="0" <if condition='isset($parent["go_child"]) && !$parent["go_child"]'> checked='checked'<else />checked='checked'</if>> 
              		<input type="radio" name="go_child" title='是' value="1" <if condition='isset($parent["go_child"]) && $parent["go_child"] '> checked='checked'</if>> 
              	</label>
              	
              </td>
            </tr>   
          	<tr>
              <th>打开方式：</th>
              <td>
              		<input type="radio" name="target" value="1" checked="checked" title='当前窗口'> 
              		<input type="radio" name="target" value="2" title='新窗口'> 
              	
              </td>
            </tr>

            <tr>
              <th >封面模板：</th>
              <td><input type="text" name="default_tpl" id="default_tpl" class='layui-input' size='50' value="<if condition='isset($parent["default_tpl"])' >{$parent.default_tpl}<else />default</if>"></td>
            </tr>
            <tr>
              <th >列表模板：</th>
              <td><input type="text" name="list_tpl" id="list_tpl" class='layui-input' size='50' value="<if condition='isset($parent["list_tpl"])' >{$parent.list_tpl}<else />lists</if>"></td>
            </tr>
            <tr>
              <th >详细页模板：</th>
              <td><input type="text" name="view_tpl" id="view_tpl" class='layui-input' size='50' value="<if condition='isset($parent["view_tpl"])' >{$parent.view_tpl}<else />view</if>"></td>
            </tr>
            <tr>
              <th >控制器：</th>
              <td><span class="must_red">*</span><input type="text" name="remark" id="remark" class='layui-input' size='50' value="<if condition='isset($parent["remark"])' >{$parent.remark}<else />Index</if>"></td>
            </tr>
            <tr>
              <th >自定义文件：</th>
              <td><input type="text" name="file_url" id="file_url" class='layui-input' size='50'></td>
            </tr>
          </table>
        </div>
      </div>
      
      </div>
 
    <div class="btn_wrap">
      <div class="btn_wrap_pd">
        <button class="layui-btn " type="submit">提交</button>
      </div>
    </div>
  </form>
</div>
<script src="__ROOT__/lib/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mod.common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mod.content_addtop.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mod.category.js"></script>



<script type="text/html" id="J_PhotoTpl">
    <li>
        <div class="img"><img src="__ROOT__/{{ d.file }}" /></div>
        <input type="hidden" name="{{ d.name }}" value="{{ d.file }}" />        
        <i class="layui-icon layui-icon-delete feng-photo-delete" title="删除图片" data-path="{{ d.file }}">
          <a href="__ROOT__/index.php/Admin/Upload/del/id/{{ d.id }}.html"></a>
        </i>
    </li>
</script>

</body>
</html>